﻿/*
 * Copyright © 2020, Wuxi Safover Intelligent Technology Co., Ltd. All rights reserved.
 * 
 * 无锡安永智能科技有限公司版权所有，未经许可，不得用于商业用途
 * 
 * Visit: https://www.safover.com/ 
 */

namespace Safover.LidarCollector.Managers
{
    public struct HScanInstruction
    {
        public readonly bool CanScan;

        public readonly float? ScanAngle;

        public readonly float FixedVerticalAngle;

        public HScanInstruction(bool canScan, float? scanAngle, float fixedVerticalAngle)
        {
            CanScan = canScan;
            ScanAngle = scanAngle;
            FixedVerticalAngle = fixedVerticalAngle;
        }

        public override string ToString()
        {
            return $"CanScan={CanScan}, ScanAngle={ScanAngle?.ToString()}, FixedVerticalAngle={FixedVerticalAngle}.";
        }
    }

    public struct VScanInstruction
    {
        public readonly bool CanScan;

        public readonly float? ScanAngle;

        public readonly bool ShouldMoveOpposite;

        public readonly float FixedHorizontalAngle;

        public VScanInstruction(bool canScan, float? scanAngle, bool shouldMoveOpposite, float fixedHorizontalAngle)
        {
            CanScan = canScan;
            ScanAngle = scanAngle;

            ShouldMoveOpposite = shouldMoveOpposite;
            FixedHorizontalAngle = fixedHorizontalAngle;
        }

        public override string ToString()
        {
            return $"CanScan={CanScan}, ScanAngle={ScanAngle?.ToString()}, FixedHorizontalAngle={FixedHorizontalAngle}, ShouldMoveOpposite={ShouldMoveOpposite}.";
        }
    }
}
